public class Test
{
	private static int RANDOM_TESTS = 10;
	
	private static void randomBenchmark()
	{
		int tot=0, ct;
		System.out.println("* Random");
		for (int i=1; i<=RANDOM_TESTS; i++)
		{
			Labyrinthe laby = Labyrinthe.laby2();
			Robot rob = new RobotAleatoire(laby);
			tot += (ct = rob.findExit());
			System.out.println("Test "+i+": "+ct+" moves");
		}
		System.out.println("Average: "+(double)tot/RANDOM_TESTS+" moves");
	}
	
	private static void regulier()
	{
		Labyrinthe laby = Labyrinthe.laby1();
		laby.affichage();
		Robot rob = new RobotRegulier(laby);
		System.out.println("* Regular");
		System.out.println(rob.findExit()+" moves");
		laby.affichage();
	}
	
	private static void recursif(int ct)
	{
		for (int i=0; i<ct; i++)
		{
			Labyrinthe laby = Labyrinthe.laby1();
			Robot rob = new RobotRecursif(laby, 50);
			System.out.println("* Recursive");
			laby.affichage();
			System.out.println(rob.findExit()+" moves");
			laby.affichage();
		}
		for (int i=0; i<ct; i++)
		{
			Labyrinthe laby = Labyrinthe.laby2();
			Robot rob = new RobotRecursif(laby, 50);
			System.out.println("* Recursive2");
			laby.affichage();
			System.out.println(rob.findExit()+" moves");
			laby.affichage();
		}
		for (int i=0; i<ct; i++)
		{
			Labyrinthe laby = Labyrinthe.laby3();
			Robot rob = new RobotRecursif(laby, 100);
			System.out.println("* Recursive3");
			laby.affichage();
			System.out.println(rob.findExit()+" moves");
			laby.affichage();
		}
		for (int i=0; i<ct; i++)
		{
			Labyrinthe laby = Labyrinthe.laby4();
			Robot rob = new RobotRecursif(laby, 200);
			System.out.println("* Recursive4");
			laby.affichage();
			System.out.println(rob.findExit()+" moves");
			laby.affichage();
		}
	}
	
	private static void rightHand()
	{
		Labyrinthe laby = Labyrinthe.laby1();
		laby.affichage();
		Robot rob = new RobotRightHand(laby);
		System.out.println("* Right hand");
		System.out.println(rob.findExit()+" moves");
		laby.affichage();
	}
	
	private static void manuel()
	{
		Labyrinthe laby = Labyrinthe.laby3();
		RobotManuel rob = new RobotManuel(laby);
		while (rob.play());
	}

	public static void main(String[] args)
	{
		//manuel();
		rightHand();
	}
}
